package com.yanqu;


import com.yanqu.road.utils.ConfigHelper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class DataAnalyticsCollectApplication {

    public static void main(String[] args) {
        try {
            if (ConfigHelper.initConfig("./config/tda.properties")) {
                SpringApplication.run(DataAnalyticsCollectApplication.class, args);
                if (!CollectServer.start()) {
                    System.exit(-1);
                }
                System.err.println("CollectServer 启动成功！");
            }
        }catch (Throwable e){
            System.err.println(e);
            System.exit(-1);
        }
        //关闭kafka
        //todo


    }
}
